package com.whuan;


import com.sun.org.apache.xerces.internal.impl.io.UTF8Reader;
import org.apache.commons.codec.binary.Base64;
import sun.nio.cs.ext.GBK;

public class Base64UtilsIBest {

    public static void main(String[] args) throws RuntimeException{
        Base64 base64 = new Base64();
        String sql = "select TRANSQ||'@'||TRANTP||'@'||BILLNO||'@'||OPBKCD||'@'||OPBKNA||'@'||OPSBBK||'@'||OPSBNA||'@'||ACCTNO||'@'||ACCTNA||'@'||UNSCCD||'@'||TOACNA||'@'||TOOPBK||'@'||TOACCT||'@'||TRANAM||'@'||PAYUSR||'@'||TRANTM||'@'||ACBLSP||'@'||REMARK  from UNIT_BILL where 1 = 1 and SENDTG = '0' and fcbpdt = '20191021' and fcbpsq = '000100000019' order by unsccd";
        //byte[] btsql1 = sql.getBytes("UTF-8");
        byte[] btsql = null;
        try {
            btsql = sql.getBytes("UTF-8");
        }catch (Exception e){

        }finally {

        }

        String base64Sign = base64.encodeToString(btsql);
        System.out.println(base64Sign);
        String s1 = Base64.encodeBase64String(btsql);
        System.out.println(s1);
    }
}
